import Fetch from '@/utils/fetch'

const fetch = new Fetch({})

export const get = function (url:string, params:any, headers:any) {
  return new Promise(function (resolve, reject) {
    fetch.get({ url, params, headers }).then(res => {
      resolve(res)
    }).catch(err => {
      reject(err)
    })
  })
}

export const psot = function (url:string, params:any, headers:any) {
  return new Promise(function (resolve, reject) {
    fetch.get({ url, params, headers }).then(res => {
      resolve(res)
    }).catch(err => {
      reject(err)
    })
  })
}
export default {
  get,
  psot
}
